//
//  View01.m
//  Multiview
//
//  Created by Jeffrey Berthiaume on 4/11/09.
//  Copyright 2009 pushplay.net. All rights reserved.
//

#import "View01.h"
#import "MultiviewAppDelegate.h"

@implementation View01

- (void)goToTwo {
	MultiviewAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
	[appDelegate displayView:2];
}

- (void)viewDidLoad {
	NSLog(@"load01");
	
	UIButton *btnOne = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 
	btnOne.frame = CGRectMake(40, 40, 240, 30);
	[btnOne setTitle:@"One!" forState:UIControlStateNormal];
	[btnOne addTarget:self action:@selector(goToTwo) forControlEvents:UIControlEventTouchUpInside];
	[self.view addSubview:btnOne];
	
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
}


- (void)dealloc {
	NSLog(@"dealloc01");
    [super dealloc];
}


@end
